﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestPlatform.Core;
using InDB.Client;
using TestPlatform.Performer.InDB.Entities;

namespace TestPlatform.Performer.InDB
{
    public class InDBUpdatePerformer : BaseUpdatePerformer
    {
        public override string UnderlyinEngine { get { return "InDB"; } }

        public InDBUpdatePerformer()
            : base(new InDBHelper())
        {

        }

        protected override void UpdateEntity(Guid id)
        {
            using (ISession s = InDBHelper.OpenSession())
            {
                User user = s.GetById<User>(id);
                user.Name = "test name";
                s.Save(id, user);
            }
        }
    }
}
